# -*- coding: utf-8 -*-

"""
@Author: 芮芪懿 QQ1849433491
@Project->File: pygame_train -> 6加载背景音乐.py
@IDE：PyCharm 2020.1
@File: 6加载背景音乐.py
@Datetime: 2021/7/8 14:35
"""

import pygame
pygame.init()
pygame.mixer.init()
pygame.mixer.music.load("./resources/sounds/bgm.mp3")
# pygame.mixer.music.load("./resources/sounds/bgm.ogg")
pygame.mixer.music.set_volume(.6)  # 设置音量
pygame.mixer.music.play(loops=-1)  # 循环播放MP3音频
while True:
    pass